package day4.Animal;

public class Dog extends Animal{
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public void disp(){
        System.out.println("继承的私有color："+getColor());
        System.out.println("继承的公开属性："+age);
        System.out.println("子类新增的属性："+name);
    }
}
